<template>
    <div class="main">
        <el-menu :uniqueOpened="true" default-active="/index" router class="el-menu-vertical-demo"
            background-color="#545c64" text-color="#fff" active-text-color="#ffd04b">
            <el-menu-item :index="item.router" v-for="item in props.menuList" :key="item.title">
                <el-icon>
                    <Location />
                </el-icon>
                <template #title>{{ item.title }}</template>
            </el-menu-item>
        </el-menu>
    </div>
</template>
  
<script lang="ts" setup>
interface Props {
    menuList: any;
}

const props: any = defineProps<Props>();

console.log(props.menuList);
</script>

<style lang="scss" scoped>
.main {
    height: 100%;

    .el-menu {
        height: 100%;
    }
}
</style>
  